/**
 * Copyright (C), 2019-2023,
 * FileName: TestCLient
 * Author:   fanxquer
 * Date:     2023/7/6 10:36
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 邱富康           2023/7/6           1.0
 */
package com.hsteach.framework.feign.client.message;

import com.alibaba.fastjson2.JSONObject;
import com.hsteach.framework.feign.ClientConstant;
import com.hsteach.framework.feign.client.auth.AuthFeignConfig;
import com.hsteach.framework.feign.client.auth.dto.AuthResp;
import com.hsteach.framework.feign.client.message.dto.AddTodothingsEntity;
import com.hsteach.framework.feign.client.message.dto.SendMsgEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 〈〉
 *
 * @author Qiu Fukang
 * @create 2023/7/6
 * @since 1.0.0
 */
@FeignClient(name = "messageClient", url = "${interface.msg.domain:127.0.0.1:8079}", configuration = AuthFeignConfig.class)
public interface MessageClient {

    /**
     * 发送站内信
     * @return
     */
    @PostMapping("/message/uapi/message/station/mine/send")
    AuthResp<JSONObject> send(@RequestHeader(ClientConstant.AUTH_ACCESS_TOKEN) String accessToken
            ,@RequestHeader(ClientConstant.AUTH_APP_TOKEN) String appToken
            ,@RequestHeader(ClientConstant.AUTH_OPERATE_CODE) String operateCode
            ,@RequestBody SendMsgEntity entity);

    /**
     * 添加待办
     * @return
     */
    @PostMapping("/todothings/uapi/todothings/add")
    AuthResp<JSONObject> addTodothings(@RequestHeader(ClientConstant.AUTH_ACCESS_TOKEN) String accessToken
            ,@RequestHeader(ClientConstant.AUTH_APP_TOKEN) String appToken
            ,@RequestHeader(ClientConstant.AUTH_OPERATE_CODE) String operateCode
            ,@RequestBody AddTodothingsEntity entity);

    /**
     * 添加待办
     * @return
     */
    @PutMapping("/todothings/uapi/todothings/deal")
    AuthResp<JSONObject> dealTodothings(@RequestHeader(ClientConstant.AUTH_ACCESS_TOKEN) String accessToken
            ,@RequestHeader(ClientConstant.AUTH_APP_TOKEN) String appToken
            ,@RequestHeader(ClientConstant.AUTH_OPERATE_CODE) String operateCode
            ,@RequestParam("id") String id);
}